package com.example.tree.entity.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;


@Data
@Setter
@Getter
public class PublishCriticVO {

    private String criticId;

    @ApiModelProperty(value = "评论内容")
    private String criticContent;

    @ApiModelProperty(value = "回复论评用户id")
    private String userId;

    @ApiModelProperty(value = "回复论评用户名称", hidden = true)
    private String userName;

    @ApiModelProperty(value = "回复论评用户头像", hidden = true)
    private String userImage;

    @ApiModelProperty(value = "评论人id")
    private String criticUserId;

    @ApiModelProperty(value = "评论人姓名")
    private String criticUserName;

    @ApiModelProperty(value = "评论人头像")
    private String criticUserAvatar;

    @ApiModelProperty(value = "文章id")
    private Long articleId;

    @ApiModelProperty(value = "评论时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date criticTime;

    @ApiModelProperty(value = "1:删除 0未删除")
    private Integer deleteCritic;

    @ApiModelProperty(value = "点赞")
    private Long praise;

    @ApiModelProperty(value = "分享")
    private Long share;

    @ApiModelProperty(value = "浏览")
    private Long glance;

    @ApiModelProperty("评论父级id，被评论的id")
    private String parentId;

    @ApiModelProperty("评论父级code")
    private String parentCode;

    @ApiModelProperty(value = "1:一级 2：二级", hidden = true)
    private Integer type;

    @ApiModelProperty(value = "评论集合", hidden = true)
    private List<PublishCriticVO> children = new ArrayList<>();

    @ApiModelProperty(value = "点赞状态 0：点赞1：取消点赞")
    private Long praiseStatus;


}
